ATI Industrial Automation   ATICombinedDAQFT .NET Class Library  

Visit our website.

Getting Started With ATICombinedDAQFT

This is a guide to the most common tasks you will perform when using the ATICombinedDAQFT class library. Specifically, you will see how to load a calibration file, start the hardware data acquisition, and read force/torque values from the F/T system.

Common Functions

LoadCalibrationFile( calFile, calibrationIndex )

Always call this function before starting the hardware acquisition. LoadCalibrationFile takes the calibration information from the .cal file, such as the calibration matrix and voltage range of the strain gauges. LoadCalibrationFile takes two arguments: calFile, the path to the calibration (*.cal) file for the F/T system you are using, and calibrationIndex, which is the index of the calibration within that .cal file you wish to use. Calibration files may contain multiple calibrations, but if your file contains only one calibration, you will always want to set calibrationIndex to 1.

StartSingleSampleAcquisition( deviceName, sampleFrequency, averaging, firstChannel, useTempComp )

StartSingleSampleAcquisition starts the DAQ hardware acquisition and allows you to read single data points on demand.

StartBufferedAcquisition( deviceName, sampleFrequency, averaging, firstChannel, useTempComp, bufferSize )

StartBufferedAcquisition starts a buffered acquisition task that you can use to collect continous data.

StopAcquisition()

StopAcquisition stops the curerntly running hardware acquisition, whether it is buffered or single-sample.

BiasCurrentLoad()

BiasCurrentLoad biases out the load that is currently applied to the sensor. This function is useful for removing the effects of any constant tooling you place on the transducer.

ReadSingleFTRecord( readings )

Use ReadSingleFTRecord after calling StartSingleSampleAcquisition to read a single data point.

ReadBufferedFTRecords( numRecords, readings )

ReadBufferedFTRecords reads a set of records from the DAQ hardware. Use this function after starting the acquisition using StartBufferedAcquisition.

Performing Simple Tasks

These samples are written using Visual Basic style pseudocode, and assume a variable named myFTSystem, of type ATICombinedDAQFT.FTSystem, exists and has been initialized.

Reading Single Samples

'first, load the calibration file
myFTSystem.LoadCalibrationFile( "c:\temporary\ft3484.cal", 1)
'now, start the task using the NI-DAQmx device "dev1", a sample rate of 1000 Hz with a 10 sample averaging filter,
'channel 0 is the first channel that the transducer is connected to, and no software temperature compensation.

myFTSystem.StartSingleSampleAcquisition( "dev1", 1000, 10, 0, False )
'Bias out the constant load
myFTSystem.BiasCurrentLoad()
'prompt the user to place a load on the sensor and take a reading MsgBox( "Please place a load on the sensor." )
dim ftReadings(5) as Double 'the force/torque readings from the sensor
myFTSystem.ReadSingleFTRecord( ftReadings )
'Do stuff with the readings...
.
.
.

Reading Buffered Data

'load calibration
myFTSystem.LoadCalibrationFile( "C:\temporary\ft3484.cal", 1 )
'you should always bias your data before starting buffered acquisition,
'so start a single sample acquisition for the purposes of biasing
myFTSystem.StartSingleSampleAcquisition( "dev1", 1000, 10, 0, False )
myFTSystem.BiasCurrentLoad()
myFTSystem.StopAcquisition()
'Start buffered acquisition with a buffer size of 200.
'We'll then read 100 samples at a time (double-buffering)

myFTSystem.StartBufferedAcquisition( "dev1", 1000, 10, 0, False, 200 )
'Read data in a loop and perform actions with it
While ( stillCollectingData )
    dim bufferedReadings( 599 ) as Double 'the buffered f/t readings
    myFTSystem.ReadBufferedFTRecords( 100, bufferedReadings )
   'perform actions with data
   .
   .
   .
End While

See Also

LoadCalibrationFile | StartSingleSampleAcquisition | StartBufferedAcquisition | StopAcquisition | BiasCurrentLoad | ReadSingleFTRecord | ReadBufferedFTRecords